package com.achao.frontdeskmanage.controller;

import com.achao.frontdeskmanage.ifeign.MusicCollectFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 描述：测试
 *
 * @Author：yangchao
 * @CreateDate：2023/1/29 22:30
 */
@RestController
@RequestMapping("/achao/music/before/")
public class AchaoTest1 {

    @Value("${pattern.dateformat}")
    private String dateformat;

    @Autowired
    private MusicCollectFeign musicCollectFeign;


    /**
     *  描述：测试nacos配置是否能够获取
     */
    @GetMapping("test2")
    public String sayHello(){
        return "阿超帅帅" + dateformat;
    }

    @PostMapping("feigntest")
    public Object sayTest(){
        return musicCollectFeign.queryAllCollect();
    }
}
